#pragma once
#include<iostream>
#include<string.h>
#include<vector> 
#include"Poker.h"
using namespace std;
//#include"Cardgame.h"

#ifndef CARD_H
#define CARD_H

//定义牌点数的数组，便于与数据成员对应，便于打印输出
const string m_CardNumber[16] = { "0","A","2","3","4","5","6","7","8","9","10","J","Q","K","Jo"};
//定义牌花色数的数组，便于与数据成员对应，便于打印输出
//const string m_CardColor[8] = { "0","heart","diamond","spade","club","R","B"};
const string m_CardColor[8] = { "0","♥","♦","♠","♣","R","B"};

class Card
{
	//设定poker为友元类，以便操作card类的数据成员
	friend class Poker;
	//设定cardgame为友元类，以便操作card类的数据成员
	//friend class Cardgame;
public:
	//声明Card的构造函数，并初始化数据成员
	Card(int num = 1, int col = 1);
	//设置card的牌点数和颜色
	void setCard(int num, int col);
	//获取牌点数
	int getCardnum();
	//获取牌色
	int getCardcolor();
	
	//打印对应的单张牌
	void printCard();
	vector<int> single_card;
private:
	int m_number;//牌点数
	int m_color;//牌花色
	
};
#endif

//声明Card的构造函数，并初始化数据成员
Card::Card(int num, int col)
{
    m_number = num;
    m_color = col;
	//single_card.push_back(m_number);
	//single_card.push_back(m_color);
}
//设置card的牌点数和颜色
void Card::setCard(int num, int col)
{
    m_number = num;
    m_color = col;
	//single_card.push_back(m_number);
	//single_card.push_back(m_color);
}
//获取牌点数
int Card::getCardnum()
{
    return m_number;
}
//获取牌色
int Card::getCardcolor()
{
    return m_color;
}
//打印对应的单张牌
void Card::printCard()
{
	cout <<"["<<m_CardColor[m_color] <<" "<<m_CardNumber[m_number] << "]";
}